<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>CSS Test: Removing one animation from a list of applied animations in the animation-name property will only stop that animation</title>
        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
        <link rel="help" href="http://www.w3.org/TR/css3-animations/#animation-behavior-" />
        <meta name="flags" content="animated dom" />
        <meta name="assert" content="Removing one animation from a list of applied animations in the animation-name property will only stop that animation." />
        <style type="text/css">
            @keyframes testAnimation1
            {
                from {left: 0px;}
                to {left: 300px;} 
            }
            @keyframes testAnimation2
            {
                from {top: 0px;}
                to {top: 300px;} 
            }
            @keyframes testAnimation3
            {
                from {background-color: black;}
                to {background-color: orange;} 
            }
            #parentDiv
            {
                position: relative;
            }
            #startDiv
            {
                background-color: blue;
                height: 50px;
                position: absolute;
                width: 50px;
            }
            #endDiv
            {
                background-color: purple;
                height: 50px;
                position: absolute;
                top: 300px;
                width: 50px;
            }
            #testDiv
            {
                animation-duration: 5s, 5s, 5s;
                animation-fill-mode: forwards, none, forwards;
                background-color: black;
                height: 50px; 
                position: absolute;
                width: 50px;
            }
        </style>
        <script type="text/javascript">
            var element;

            function startTest()
            {
                document.body.offsetWidth;
                element = document.getElementById("testDiv");
                element.style["animation-name"] = "testAnimation2, testAnimation1, testAnimation3";   
                setTimeout("element.style['-" + prefix + "-animation-name'] = 'testAnimation2, nonMatchingNameToKeepFillMode, testAnimation3';", 1000);
            }
        </script>
    </head>
    <body onload="startTest()">
        <p>Test passes if the black block begins to slide diagonally, then snaps to the left and slides to the purple block and changes from black to orange in color. </p>
        <div id="parentDiv">
            <div id="startDiv"></div>
            <div id="endDiv"></div>
            <div id="testDiv"></div>
        </div>
    </body>
</html>
